//2、创建一个联系reducer的store.js文件
//引入redux
import {
    applyMiddleware,
     createStore,
     combineReducers
    } from 'redux'



//先创建一个store，再创建redicer引入
//引入reducer
import countReducer from './reducers/countReducer'
import musicReducer from './reducers/musicReducer'

//创建判断异步操作的中间件
import thunk from 'redux-thunk'

// 合并多个reducer
const allReducer = combineReducers({
   count : countReducer,
   movie : musicReducer,
})

//(react引入applyMiddleware参数,是用来处理异步的中间件)
const store = createStore(allReducer,applyMiddleware(thunk));

//暴露这个文件
export default store